package com.JavaBasic;

import java.math.BigInteger;

public class BigIntegerDemo {
	public static void main(String[] args) {
		BigInteger a = new BigInteger("10");
		BigInteger b = new BigInteger("3");

		System.out.println(a.toString() + " + " + b.toString() + " = " + a.add(b).toString());
		System.out.println(a.toString() + " - " + b.toString() + " = " + a.subtract(b).toString());
		System.out.println(a.toString() + " x " + b.toString() + " = " + a.multiply(b).toString());
		System.out.println(a.toString() + " / " + b.toString() + " = " + a.divide(b).toString());
		BigInteger[] result = a.divideAndRemainder(b);
		System.out.println(a.toString() + " / " + b.toString() + " = " + result[0].toString() + "余" + result[1].toString());
	}
}
